The present disclosure relates generally to database processing techniques and more specifically to techniques for database processing initiated by a client in a multi-server environment.
Conventional database systems in multi-server environments provide the advantage of providing continuous operations. This means that in case of catastrophic failures or one or more servers, other available servers in the environment can still continue operating. Nonetheless, despite the availability of continuous operation, any operation, task or transaction that was being performed by one of the failed servers will not be completed. In such instances, the operation or task may have to be reinitiated by a new server and any data obtained may be affected or lost. In other words, once the server fails prior to the completion of an operation, task or transaction, the transaction and related data will be rolled back.
Rolling back of the transaction can cause data integrity and performance issues in some instances. For example, in operations such as those using structured query language (SQL), a user must reissue the same SQL statement to start the operation and the same SQL statement will be also be issued automatically during a rolled back transaction. However, this causes more than redundancy concerns. In instances when the same SQL statement has to be reissued, there is a possibility that the consistency of the data that is the subject of the SQL statement will be lost. When the transaction updates the data, a lock is applied to the data, but the lock on the data is released by the rollback operation. Therefore data is likely to be updated by another unrelated transaction prior to reissuance of the same SQL for the original transaction. One example can add more clarity. In this example, a person is reserving an airline seat, but before the completion of the transaction, the person receives an error notification that the transaction has failed. When the person tries to reserve the same seat again, the system indicates that the seat has already been taken and reserved by another person. These types of problems, therefore, need to be taken into account and minimized to achieve an optimal system.